<?php
$baseUrl = Yii::app()->request->baseUrl;
$themeUrl = Yii::app()->theme->baseUrl;
$lastNews;
$pages;
$news;
?>

<div class="col-left">
    <div id="typical-slider">
        <div id="featured">
            <ul class="ui-tabs-nav">
                <?php foreach ($lastNews as $key => $lastNew): ?>
                    <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-<?php echo $key; ?>">
                        <a href="#fragment-<?php echo $key; ?>">
                            <?php if ($key === 4): ?>
                                <img src="<?php echo $themeUrl ?>/res/images/typical_slider/image1-small.jpg" alt="Image" /></a></li>
                    <?php else: ?>
                        <img src="<?php echo $themeUrl ?>/res/images/typical_slider/image<?php echo $key + 1; ?>-small.jpg" alt="Image" /></a></li>
                    <?php endif; ?>

                <?php endforeach; ?>
            </ul>
            <?php foreach ($lastNews as $key => $lastNew): ?>
                <div id="fragment-<?php echo $key ?>" class="ui-tabs-panel" style="">
                    <?php if ($key === 4): ?>
                        <img src="<?php echo $themeUrl ?>/res/images/typical_slider/image1-small.jpg" alt" /></a></li>
                    <?php else: ?>
                        <img src="<?php echo $themeUrl ?>/res/images/typical_slider/image<?php echo $key + 1; ?>-small.jpg" alt="Image" /></a></li>
                    <?php endif; ?>    
                    <div class="info">
                        <h2><a href="<?php echo $this->createUrl('article/view', array('keyword' => $lastNew->keyword)) ?>"><?php echo $lastNew->title; ?></a></h2>
                        <p><?php echo $lastNew->excerpt; ?></p>
                    </div>
                </div>
            <?php endforeach; ?>
        </div>
    </div>

    <div class="home-col">
        <div class="listArticlesContainer">
            <div class="home-col">
                <?php foreach ($news as $new): ?>
                    <div class="home-article">
                        <h2 class="subHeading"><a href="<?php echo $this->createUrl('article/view', array('keyword' => $new->keyword)) ?>"><?php echo $new->title; ?></a></h2>
                        <p><?php echo $new->excerpt; ?> </p>
                        <!--<a class="bt-green" href="#" title="Read more">Read more</a>-->
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
        <div class="pagging">
            <div>
                <?php
                $this->widget('CLinkPager', array(
                    'header' => Yii::t('default', 'Go to page'),
                    'firstPageLabel' => '&lt;&lt;',
                    'prevPageLabel' => '&lt;',
                    'nextPageLabel' => '&gt;',
                    'lastPageLabel' => '&lt;&lt;',
                    'pages' => $pages,
                ))
                ?>
            </div>
        </div>
    </div>
</div>

